<?php
/**
 * system map 是核心模块如果要单独使用的话需要将这两个一起拷贝
 */
include_once "Kernal/System/Context.class.php";

use SimplePhp\Database as database;
use SimplePhp\Dispatcher as dispatch;
use SimplePhp\System\DI;

//只显示致命错误提示
// error_reporting(7);
$rootpath = dirname(__file__);
//核心目录的
define("CORE_PATH", $rootpath);
//web根目录
define("ROOT_PATH", dirname($rootpath));
define("CORE_CACHE_PATH", CORE_PATH . DIRECTORY_SEPARATOR . "LocalCache" . DIRECTORY_SEPARATOR);
define("debug", true);
$context = \SimplePhp\System\Context::getInstanct();
$context->iniAutoLoad();
//注入基本的组件
DI::inj("DbHelp", new database\MysqlDbHelp());
DI::inj("IConstraint", new database\MysqlConstraintBuild());
DI::inj("IDispatch", new dispatch\GetDispatch());